package com.hollycrm.unicom.security.web;

import javax.servlet.ServletException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;

public class EncodePlugin implements PlugIn {
	
	private static Log log = LogFactory.getLog(EncodePlugin.class);

	private String isEncoded;
	
	public void destroy() {
		// TODO Auto-generated method stub

	}

	public void init(ActionServlet actionServlet, ModuleConfig moduleConfig)
			throws ServletException {
		// TODO Auto-generated method stub
		log.info("is choose Md5 "+isEncoded);
			System.out.println(isEncoded);
		actionServlet.getServletContext().setAttribute("isEncoded", isEncoded);
			
	}

	public String getIsEncoded() {
		return isEncoded;
	}

	public void setIsEncoded(String isEncoded) {
		this.isEncoded = isEncoded;
	}

	
	
	
	

}
